﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using CondominioWeb.Negocio;
using CondominioWeb.Dominio;

namespace CondominioWeb.Controllers
{
    public class MorosoController : Controller
    {
        public PagoMorosidadService PagoMorosidadService { get; set; }

        public ActionResult Index()
        {
            ICollection<Mantenimiento> modelo = PagoMorosidadService.ListarResidentesMorosos(1);
            return View(modelo);
        }

        public ActionResult Details(int Codigo)
        {
            Mantenimiento modelo = PagoMorosidadService.MantenimientoObtener(Codigo);
            return View(modelo);
        }

        public ActionResult Create()
        {
            return View();
        } 

        [HttpPost]
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
 
        public ActionResult Edit(int id)
        {
            return View();
        }

        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
 
        public ActionResult Delete(int id)
        {
            return View();
        }

        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
